package com.zareal.ymcc.service.impl;

import com.zareal.ymcc.doc.CourseSearchDoc;
import com.zareal.ymcc.repository.CourseRepository;
import com.zareal.ymcc.service.ICourseEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseEsServiceImpl implements ICourseEsService {
    @Autowired
    private CourseRepository courseRepository;
    @Override
    public void saveCourseEs(CourseSearchDoc courseSearchDoc) {
        courseRepository.save(courseSearchDoc);
    }

    @Override
    public void deletCourseEs(Long courseId) {
        courseRepository.deleteById(courseId);
    }
}
